export function dateListStart(a) {
    var start = new Date(a).getTime() / 1000;
    var end = start - (60 * 60 * 24 * 14); // 14 天前

    const endDate = new Date(parseInt(end) * 1000);
    const year = endDate.getFullYear();
    const month = String(endDate.getMonth() + 1).padStart(2, '0'); // 补零
    const day = String(endDate.getDate()).padStart(2, '0'); // 补零

    return `${year}-${month}-${day}`;
}

export function dateListEnd() {
    let year = new Date().getFullYear()
    let month = ((new Date().getMonth() + 1) >= 10 ? (new Date().getMonth() + 1) : '0' + (new Date().getMonth() + 1))
    let date = (new Date().getDate() >= 10 ? new Date().getDate() : '0' + new Date().getDate())
    return year + '-' + month + '-' + date
}
